home *** CD-ROM | disk | FTP | other *** search
/ PC World Komputer 2010 April / PCWorld0410.iso / hity wydania / Ubuntu 9.10 PL / karmelkowy-koliberek-9.10-netbook-remix-PL.iso / casper / filesystem.squashfs / var / lib / dpkg / info / python-telepathy.prerm < prev    next >
Text File  |  2009-08-26  |  2KB  |  93 lines

  1. #!/bin/sh
  2. set -e
  3. # Automatically added by dh_pycentral
  4. case "$1" in remove|upgrade)
  5.     pkgremove=y
  6. esac
  7. if [ -f /var/lib/pycentral/python-telepathy.pkgremove ] || [ -f /var/lib/pycentral/pkgremove ]; then
  8.     pkgremove=y
  9. fi
  10. if [ "$pkgremove" = y ]; then
  11. if which python >/dev/null 2>&1 && which pycentral >/dev/null 2>&1; then
  12.     pycentral pkgremove python-telepathy
  13. else
  14.     flist=$(tempfile)
  15.     slist=$(tempfile)
  16.     dpkg -L python-telepathy | tee $flist | \
  17.     while read n; do
  18.       case "$n" in
  19.         /usr/share/pyshared/*)
  20.           n2=${n#/usr/share/pyshared/*}
  21.           case "$n" in
  22.         *.py) echo "p $n";;
  23.         *) [ -d "$n" ] && echo "d $n2" || echo "f $n2"
  24.           esac
  25.           ;;
  26.         *) continue
  27.       esac
  28.     done > $slist
  29.     if [ -s $slist ]; then
  30.         for d in /usr/lib/python[0-9].[0-9]/????-packages; do
  31.         case "$d" in */python2.1/*|*/python2.2/*) continue; esac
  32.         while read t n; do
  33.             case "$t" in
  34.             p) rm -f $d/$n $d/${n}[co];;
  35.             d) rmdir $d/$n 2>/dev/null || true;;
  36.             *) rm -f $d/$n
  37.             esac
  38.         done < $slist
  39.         done
  40.     fi
  41.         awk '/\/usr\/share\/pyshared/ {next} /\.py$/ {print $0"c\n" $0"o"}' $flist \
  42.         | xargs -r rm -f >&2
  43.     rm -f $flist $slist
  44. fi
  45. rm -f /var/lib/pycentral/python-telepathy.pkgremove
  46. fi
  47. # End automatically added section
  48. # Automatically added by dh_pycentral
  49. case "$1" in remove|upgrade)
  50.     pkgremove=y
  51. esac
  52. if [ -f /var/lib/pycentral/python-telepathy.pkgremove ] || [ -f /var/lib/pycentral/pkgremove ]; then
  53.     pkgremove=y
  54. fi
  55. if [ "$pkgremove" = y ]; then
  56. if which python >/dev/null 2>&1 && which pycentral >/dev/null 2>&1; then
  57.     pycentral pkgremove python-telepathy
  58. else
  59.     flist=$(tempfile)
  60.     slist=$(tempfile)
  61.     dpkg -L python-telepathy | tee $flist | \
  62.     while read n; do
  63.       case "$n" in
  64.         /usr/share/pyshared/*)
  65.           n2=${n#/usr/share/pyshared/*}
  66.           case "$n" in
  67.         *.py) echo "p $n";;
  68.         *) [ -d "$n" ] && echo "d $n2" || echo "f $n2"
  69.           esac
  70.           ;;
  71.         *) continue
  72.       esac
  73.     done > $slist
  74.     if [ -s $slist ]; then
  75.         for d in /usr/lib/python[0-9].[0-9]/????-packages; do
  76.         case "$d" in */python2.1/*|*/python2.2/*) continue; esac
  77.         while read t n; do
  78.             case "$t" in
  79.             p) rm -f $d/$n $d/${n}[co];;
  80.             d) rmdir $d/$n 2>/dev/null || true;;
  81.             *) rm -f $d/$n
  82.             esac
  83.         done < $slist
  84.         done
  85.     fi
  86.         awk '/\/usr\/share\/pyshared/ {next} /\.py$/ {print $0"c\n" $0"o"}' $flist \
  87.         | xargs -r rm -f >&2
  88.     rm -f $flist $slist
  89. fi
  90. rm -f /var/lib/pycentral/python-telepathy.pkgremove
  91. fi
  92. # End automatically added section
  93.